<?php defined('InShopNC') or exit('Access Invalid!');?>

<?php if(isset($output['goods_list']) && !empty($output['goods_list']) and is_array($output['goods_list'])):?>
    <input type="hidden" name="marketing_activity_id" value="<?=(isset($output['marketing_activity_id']) ? (int)$output['marketing_activity_id'] : 0)?>"/>
    <div class="search-result">
      <ul class="goods-list">
        <?php foreach($output['goods_list'] as $goods):?>
          <li>
            <div class="goods-thumb"><a href="<?php echo urlShop('goods', 'index', array('goods_id' => $goods['goods_id']));?>" target="_blank"><img alt="<?php echo $goods['goods_name'];?>" title="<?php echo $goods['goods_name'];?>" src="<?php echo cthumb($goods['goods_image'], 240, $_SESSION['store_id']);?>"/></a></div>
            <dl class="goods-info">
              <dt>
                <?php if($goods['apply_conflict'] === true):?>
                  <input type="checkbox" value="<?=$goods['goods_id']?>" class="vm" name="add_data[<?=$goods['goods_id']?>][goods_id]"/>
                <?php endif;?>
                <label><a href="<?php echo urlShop('goods', 'index', array('goods_id' => $goods['goods_id']));?>" target="_blank"><?php echo $goods['goods_name'];?></a></label>
              </dt>
              <dd>销售价格：￥<?php echo ncPriceFormat($goods['goods_price']);?></dd>
              <?php if($goods['apply_conflict'] === true):?>
                <dd>活动价：￥<input type="text" value=""  class="promotion_price" name="add_data[<?=$goods['goods_id']?>][promotion_price]"/></dd>
                  <?php if($output['marketing_activity_type']>2):?>
                <dd style="display: none;">购买上限：<input type="text" value="1" class="upper_limit" name="add_data[<?=$goods['goods_id']?>][upper_limit]"/></dd>
                  <?php else:?>
                <dd >购买上限：<input type="text" value="0" class="upper_limit" name="add_data[<?=$goods['goods_id']?>][upper_limit]"/></dd>
                  <?php endif;?>
              <?php else:?>
                <dd style="color: red;"><?=$goods['apply_conflict_cause']?></dd>
              <?php endif;?>
            </dl>
          </li>            
        <?php endforeach;?>
        <div class="clear"></div>
      </ul>
    </div>
    <div class="pagination"><?php echo $output['show_page'];?></div>
<?php else:?>
    <div class="warning-option"><i class="icon-warning-sign"></i><span><?php echo $lang['no_record'];//您尚未发布任何商品?></span></div>
<?php endif;?>

<?php if(isset($output['goods_list']) && !empty($output['goods_list']) and is_array($output['goods_list'])):?>
    <div class="bottom tc p10">
      <input type="submit" class="submit" style="display: inline; *display: inline; zoom: 1;" value="<?php echo $lang['store_activity_join_now'];?>"/>
    </div>
<?php endif;?>